package com.kool.kmetrics.controller;

import com.kool.kmetrics.common.bean.ObjectResult;
import com.kool.kmetrics.common.util.ResultUtil;
import com.kool.kmetrics.service.QueryService;
import com.kool.kmetrics.vo.MetricsVo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author luyu
 * @date 2021-04-19 22:25
 */
@RestController
public class QueryController {
    @Resource
    private QueryService queryService;

    /**
     * 查询平台指标
     *
     * @return
     */
    @PostMapping("/getGlobalCnt")
    public ObjectResult<MetricsVo> getGlobalCnt() {
        return ResultUtil.success(queryService.getGlobalCnt());
    }
}
